<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //window在调用时可以省略
        window.setTimeout(function() {
            console.log('定时器函数被调用=======');
        }, 3000);

        function callback() {
            console.log('定时器回调函数=====callback');
        }
        window.setTimeout(callback, 1000);
        //我们不提倡这中调用方法
        setTimeout('callback()',2000)

        var timer = setTimeout(callback, 4000);
        var timer2 = setTimeout(callback, 5000);
    </script>
</body>
</html>

